package com.appspot.modutajataja;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.Toast;

public class SetupActivity extends Activity {
	Button setup_btn1;
	Button setup_btn2;
	Button setup_btn3;
	Button setup_btn4;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.option_setup_dialog);

		getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
		
		setup_btn1 = (Button) findViewById(R.id.setup_btn1);
		setup_btn1.setOnClickListener(new SetupHandler());

		setup_btn2 = (Button) findViewById(R.id.setup_btn2);
		setup_btn2.setOnClickListener(new SetupHandler());

		setup_btn3 = (Button) findViewById(R.id.setup_btn3);
		setup_btn3.setOnClickListener(new SetupHandler());

		setup_btn4 = (Button) findViewById(R.id.setup_btn4);
		setup_btn4.setOnClickListener(new SetupHandler());
	}

	class SetupHandler implements OnClickListener {

		@Override
		public void onClick(View v) {
			if (v.getId() == R.id.setup_btn1) {
				Toast.makeText(SetupActivity.this, "button1 click", Toast.LENGTH_SHORT).show();
			} else if (v.getId() == R.id.setup_btn2) {
				Toast.makeText(SetupActivity.this, "button2 click", Toast.LENGTH_SHORT).show();
			} else if (v.getId() == R.id.setup_btn3) {
				Toast.makeText(SetupActivity.this, "button3 click", Toast.LENGTH_SHORT).show();
			} else if (v.getId() == R.id.setup_btn4) {
				Toast.makeText(SetupActivity.this, "button4 click", Toast.LENGTH_SHORT).show();
			}
		}
	}
};